/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sv.edu.ufg.mir.Calcula.Area;

/**
 *
 * @author javaee
 */
public class Triangulo {
    private double largo;
    private double alto;
    
    public Triangulo(){
        this.largo=0;
        this.alto=0;
    }

    public Triangulo(double largo, double alto) {
        this.largo = largo;
        this.alto = alto;
    }

    public double getLargo() {
        return largo;
    }

    public void setLargo(double largo) {
        this.largo = largo;
    }

    public double getAlto() {
        return alto;
    }

    public void setAlto(double alto) {
        this.alto = alto;
    }

    @Override
    public String toString() {
        return "Triangulo{" + "largo=" + largo + ", alto=" + alto + '}';
    }
    
    public double CalcularArea(){
        double area=(this.largo * this.alto)/2;
        return area;
    }
    
    
}
